package com.goods.shop.util;

import cn.hutool.http.HttpRequest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class EmsUtils {
    private static Logger logger=LogManager.getLogger(LogManager.ROOT_LOGGER_NAME);
    private static final String TRACEURL="http://211.156.201.13:7001/emstrace/zd?type=json&traceNo=";

    public static String getTrace(String url,String traceNo){
        url=TRACEURL+traceNo;
        String result= HttpRequest.get(url).execute().body();
        return result;
    }

    public static void main(String[] args) {
        String result= EmsUtils.getTrace(TRACEURL,"9892019112604");
        logger.info("result={}",result);
    }

}
